/**
  ETFDAQ Project
  \class TAThread
  \brief a general testing thread class to prepare for the DAQ thread
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2024-08-20
  \date 2024-08-20 last modified

  \copyright Copyright (c) 2024 IMP-CAS with LGPLv3 LICENSE
*/

#ifndef TAThread_h
#define TAThread_h

#include <QThread>
#include <QMutex>
#include "daqstatus.h"

class TAGDAQ;

class TAThread : public QThread{
  Q_OBJECT
public:
  TAThread(TAGDAQ *gdaq);
  virtual ~TAThread();

  EDAQSTA daqStatus();

public slots:
  virtual void run() override;
  virtual void updateStatus(const EDAQSTA &sta);

protected:
  QMutex fMutex;
  EDAQSTA fDaqSta;
  TAGDAQ *fGDAQ;
};

#endif
